<div class="add">
	<form action="<?php echo url('news/add');?>" method="post" id="addForm">
		<table cellpadding="0" cellspacing="0">
			<tr height="30">
				<td class="inputtxt" align="right" width="80"><span>文章标题</span></td>
				<td align="left" class="magin">
					<input type="text" class="required" name="news[title]" value="" /><span style="color:red;">*</span>
				</td>
			</tr>
			<tr height="30">
				<td class="inputtxt" align="right"><span>文章分类</span></td>
				<td align="left" class="magin">
					<?php echo fetch('categorySelect',array('name'=>'news[categoryID]','type'=>service_type::NEWS));?>
				</td>
			</tr>
			<tr>
				<td class="inputtxt" align="right"><span>文章图片</span></td>
				<td align="left" class="magin">
					<?php echo fetch('uploadImg',array('limit'=>1,'picType'=>service_type::NEWS));?>
				</td>
			</tr>
			<tr>
				<td class="inputtxt" align="right"><span>排序</span></td>
				<td align="left"><input type="text" name="news[sortID]" /></td></tr>
			<tr>
			<tr height="50">
				<td class="inputtxt" align="right"><span>文章摘要</span></td>
				<td align="left" class="magin"><textarea name="news[description]" cols="100" rows="4"></textarea></td>
			</tr>
			<tr>
				<td class="inputtxt" align="right"><span>文章内容</span></td>
				<td align="left" class="magin"><textarea id="ckeditor" name="news[content]"></textarea></td>
			</tr>
			<tr height="30"><td colspan="2" align="right"><input type="submit" value="添加" onClick="CKupdate();" id="catesub" /></td></tr>
		</table>
	</form>
</div>
<script type="text/javascript">
$(document).ready(function(){
	CKEDITOR.replace('ckeditor',{
		filebrowserImageUploadUrl:"/admin.php/image/ckUpload.html",
	});
	$("#wBox .wBox_body").css("width","830");
	submitForm("#addForm",{
		dataType:'json',
		success:function(data){
				if(data.i=='ok'){
					location.href="<?php echo url('news/index');?>";
				}else{
					alert(data.i);
				}
			},
	});
});
</script>
